//
//  WMAboutBrandsViewController.m
//  DSBet
//
//  Created by hwm on 2018/5/21.
//  Copyright © 2018年 Bill. All rights reserved.
//

#import "WMAboutBrandsViewController.h"
#import "WMAboutBrandView.h"
#import "WMOpenProtocolViewController.h"

@interface WMAboutBrandsViewController ()

@property (nonatomic, strong) WMAboutBrandView *brandView;

@end

@implementation WMAboutBrandsViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.title = @"关于我们";
    [self setUpInterface];
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
}
- (void)setUpInterface {
    
    _brandView = [[NSBundle mainBundle] loadNibNamed:@"WMAboutBrandView" owner:self options:nil].firstObject;
    __weak typeof(self) weakSelf = self;
    _brandView.clickAboutBrandViewBlock = ^(UIButton *btn) {
        [weakSelf clickAgreementBtn:btn];
    };
    _brandView.frame = self.view.bounds;
    [self.view addSubview: _brandView];
    
    
}

- (void)clickAgreementBtn:(UIButton *)btn {
    WMOpenProtocolViewController *web = [WMOpenProtocolViewController openProtocolWithHtml:@"serviceProtocol"];
    web.title = @"服务协议";
    [self.navigationController pushViewController:web animated:YES];
}


@end
